package com.block.product.enums;


import cn.hutool.core.util.StrUtil;
import lombok.Getter;

@Getter
public enum UnionTypeEnum {

    DEFAULT("DEFAULT", "默认登陆")
    ,YONGQIANFENQI("YONGQIANFENQI", "用钱分期")
    ,QIANXIAOHUA("QIANXIAOHUA", "乾小花")
    ,MENGXINHUA("MENGXINHUA", "萌薪花")
    ;

    private String value;
    private String name;

    UnionTypeEnum(String value, String name){
        this.value = value;
        this.name = name;
    }

    public static UnionTypeEnum getEntityByType(String actionType){
        for (UnionTypeEnum typeEnum : values()) {
            if (StrUtil.equals(typeEnum.getValue(), actionType)){
                return typeEnum;
            }
        }
        return null;
    }
}
